|
2020-2021 Sunseeker Telemetry and Lighting System
|
#include "driverlib.h"Go to the source code of this file.
Functions | |
| void | main (void) |
| void main | ( | void | ) |
COMPB - LED Toggle in LPM4, Vcomp_0 is compared against Vcomp_1 voltage
Use CompB and internal reference to determine if input 'Vcompare' is high of low. When Vcomp_0 exceeds Vcomp_1 CBOUT goes high and when Vcomp_0 is less than Vcomp_1 then CBOUT goes low. Connect P1.6/CBOUT to P1.0 externally to see the LED toggle accordingly.
MSP430x552x
------------------
/|\| |
| | P6.0/CB0|<- Vcomp_0
--|RST P6.1/CB1|<- Vcomp_1
| P1.6/CBOUT|--> 'high'(Vcomp_0>Vcomp_1);
| | | 'low'(Vcomp_0<Vcomp_1)
| | |
| P1.0|_| LED 'ON'(Vcomp_0>Vcomp_1);
| | 'OFF'(Vcomp_0<Vcomp_1)
This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:
This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.
Definition at line 69 of file comp_b_ex6_extRef.c.
References __delay_cycles(), __no_operation(), and param.